<li>
  <%= role.name %>
  [
  <% if @user.has_role?(role.name) %>
    <%= link_to 'remove role', :controller => "roles", :method => 'delete' %>
  <% else %>
    <%= link_to 'assign role', :controller => "roles", :method => 'put' %>
  <% end %>
  ]
</li>